package com.tansun.easycare.rule.ruleflow.entity;

import org.hibernate.validator.constraints.Length;

import com.tansun.easycare.rule.common.entity.RuleBaseEntity;
import com.tansun.easycare.rule.ruleflow.model.RuleFlowModel;

/**
 * 规则流Entity
 *
 * @author lph
 * @version 2017-04-17
 */
public class RuleFlow extends RuleBaseEntity<RuleFlow> {

    private static final long serialVersionUID = 1L;
    private String projectCode;        // 规则项目编码
    private String manageId;        // 规则模型关联ID
    private String version;        // 版本号
    private String ruleflowInfo;        // 规则流信息


    public RuleFlow() {
        super();
    }

    public RuleFlow(RuleFlowModel ruleFlow) {
        super();
        this.projectCode = ruleFlow.getProjectCode();
        this.manageId = ruleFlow.getManageId();
        this.version = ruleFlow.getVersion();
        this.ruleflowInfo = ruleFlow.getRuleflowInfo();
    }

    public RuleFlow(String id) {
        super(id);
    }

    @Length(min = 0, max = 50, message = "project_code长度必须介于 0 和 50 之间")
    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getManageId() {
        return manageId;
    }

    public void setManageId(String manageId) {
        this.manageId = manageId;
    }

    @Length(min = 0, max = 10, message = "version长度必须介于 0 和 10 之间")
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getRuleflowInfo() {

        return ruleflowInfo;
    }

    public void setRuleflowInfo(String ruleflowInfo) {
        this.ruleflowInfo = ruleflowInfo;
    }


    public String getTmpRuleflowInfo() {
        return this.ruleflowInfo;
    }

}